<?php $view = $this; if(1!=1)$view = new View(); ?>
<?php $view->import('header');?>

<div id="header">
	<?php $view->import('nav');?>
  </div>
  <div id="mainContent">
    <div id="sidebar">
    	<?php $view->import('sidebar');?>
	</div>
    <div id="content">
		<p><a href="index.php?m=account&a=add" onclick="showWindow('addaccount', this.href, 'get', 1, {'cover':'1'}); return false;">添加账户</a></p>
        <table style="width:100%;" class="data">
        <tr><th>AccountName</th><th>Balance</th><th>AccountTypeName</th><th>Bank</th><th>Status</th><th>CreateDate</th><th>Remark</th></tr>
        <?php foreach($this->Account as $k=>$v):?>
        <tr>
        <td><?php echo $v['AccountName']?>&nbsp;</td>
        <td><?php echo $v['Balance']?>&nbsp;</td>
        <td><?php echo $v['AccountTypeName']?>&nbsp;</td>
        <td><?php echo $v['BankName']?>&nbsp;</td>
        <td><?php echo $v['Status'] == 1 ? '启用' : '禁用'?>&nbsp;</td>
        <td><?php echo date('Y-m-d', $v['CreateDate'])?>&nbsp;</td>
        <td><?php echo $v['Remark']?>&nbsp;</td>
        </tr>
        <?php endforeach;?>
        </table>
	</div>
  </div>

<?php $view->import('footer');?>